/**ai出牌 */
var _ = require('../../../FrameWork/we_underscore');
var FindSameCardValueTool = require('../../FindTool/FindSameCardValueTool');
var EumPkGroup = require('../../Enum/EumPkGroup');
var AIGetBombKing = module.exports = {};

/***AI出牌
 * _cardsInfo:[{}];
 */
AIGetBombKing.do = function(_lastCardInfo, _cardsInfo) {
    var cardCnt = _.size(_cardsInfo);
    if (cardCnt < 2) {
        return {
            isFind: false
        };
    }

    var kingCards = _.filter(_cardsInfo, function(_cardInfo) {
        return 5 == _cardInfo.cardType;
    });
    if (_.size(kingCards) == 2) {
        //计算带的那张牌
        return {
            isFind: true,
            type: EumPkGroup.BOMBKING,
            recommendCards: kingCards, //推荐组
            allGetCardsGroup: [] //所有组 
        };
    }
    return {
        isFind: false
    };
};